<%--
  Created by IntelliJ IDEA.
  User: aa324
  Date: 2023/6/17
  Time: 23:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>dyp电影列表</title>
    <script src="./lib/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="./lib/bootstrap/css/bootstrap.min.css">
    <style>
        td{
            vertical-align: middle!important;
        }
        #ticket{
            position: absolute;
            right: 0;
            bottom: 20%;
            width: 5em;
            height: 3em;
            color: #2c3e50;
            background-color: #ecf0f1;
            border-radius: 0.5rem 0 0 0.5rem;
            display: inline-flex;
            justify-content: center;
            align-items: center;
            text-decoration: none;
            box-shadow: 2px 2px 3px black;
            font-weight: bold;
        }
        #ticket:hover{
            color: white;
            background-color: darkgray;
        }
    </style>
</head>
<body class="bg-white">
    <div class="container-lg">
        <table cellpadding="1 1" class="table table-striped bg-light col-10 m-auto>
            <thead class="thead-light">
            <tr class="text-center">
                <th>电影名</th>
                <th>时长</th>
                <th>票价</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${sessionScope.filmList}" var="film">
                <tr class="text-center">
                    <td><c:out value="${film.getName()}" /></td>
                    <td><c:out value="${film.getTime()}" /></td>
                    <td><c:out value="${film.getPrice()}" /></td>
                    <td>
                        <a href="${film.getUrl()}" class="btn btn-danger shadow rounded-pill">选购影票</a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <jsp:useBean id="s" class="com.edu.gdkm.util.cookiesUtil"/>
        <span class="text-info">欢迎用户：${(s.splitCookies(cookie.dyp_user))[0]}</span>
        <a href="${pageContext.request.contextPath}/exitServlet" class="btn btn-info text-light font-weight-bold ml-4">注销</a>
        <%--侧边按钮--%>
        <a href="${pageContext.request.contextPath}/ticketServlet" id="ticket">影票详情</a>
    </div>
</body>
</html>
